package cn.tedu.cotroller;

import cn.tedu.pojo.Car;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/car")
public class CarCotroller {
    @RequestMapping("/get")
    public Car get(){
        Car c = new Car();
        c.setId(1);
        c.setName("宝马");
        c.setType("3X");
        c.setColor("红色");
        c.setPrice(300000.00);
        return c;
    }
    @RequestMapping("/add")
    public void add(int id){
        System.out.println("添加成功"+id);
    }

}
